package cn.tedu.baidashi.vo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class AddressVo implements Serializable {
    @NotBlank(message = "省不能为空")
    private String provinceName;
    @NotBlank(message = "市不能为空")
    private String cityName;
    @NotBlank(message = "区不能为空")
    private String zoneName;
    @NotBlank(message = "详细地址不能为空")
    @Pattern(regexp = "^.{5,120}$",message ="详细地址长度需要在5-120个汉字或字符" )
    private String street;
    @NotBlank(message = "邮编不能为空")
    private String postcode;
    @NotBlank(message = "顾客名不能为空")
    @Pattern(regexp = "^.{2,25}$",message = "收货人姓名长度需要在2-25个汉字或字符之间")
    private String customerName;
    @NotBlank(message = "电话号码不能为空")
    @Pattern(regexp = "^\\d{6,20}$",message = "6-20个数字")
    private String phone;
    private Integer customerId;
    private String status;
    private Integer id;


}
